package com.aliyun.heiyu.common.entity;


import com.aliyun.heiyu.common.util.PropertiesUtil;

public class Constant {
    public static final String SEPARATOR_COMMA = ",";
    public static final int DATA_COLLECT_INTERNAL = 30;
    public static final String POWER_MASTER = "PowerMaster";
    public static final String CAPPING = "capping";
    public static final String POWEROFF = "power_off";
    public static final String DVFS = "dvfs";
    public static final String CSTATE = "c_state";
    public static final String AI_CAPPING = "ai_capping";
    public static final String AI_POWEROFF = "ai_power_off";
    public static final String AI_DVFS = "ai_dvfs";
    public static final String AI_CSTATE = "ai_c_state";
    public static final String ORDINARY_STATE = "ordinary";
    public static final String FREE_STATE = "free";
    public static final String SHUT_DOWN = "shut_down";

    public static String DB_PATH() {

        StringBuffer sb = new StringBuffer();
        //String userHome = System.getenv("USERPROFILE");
        String userHome = PropertiesUtil.getHome();
        if (userHome.contains("..\\")) {
            userHome = userHome.replace("..\\", "");
        }
        if (userHome.contains("../")) {
            userHome = userHome.replace("../", "");
        }
        if (userHome.contains("./")) {
            userHome = userHome.replace("./", "");
        }

        String fileSeperator = "/db/";
        userHome = userHome.replace("..", "");
        sb = sb.append(userHome).append(fileSeperator);
        return sb.toString();
    }


}
